<template>
  <div class="hospital-list-content-item-wrap">
    <nuxt-link :to="`/hospital/${hospitalDatas.user_id}`">
      <div class="hospital-list-content-item-photo-wrap">
        <img
          :src="hospitalDatas.user_photo"
          class="hospital-list-content-item-photo"
        >
        <img
          src="~assets/img/authentication.png"
          alt=""
          class="hospital-list-content-item-photo-authentication"
        >
      </div>
    </nuxt-link>

    <div class="hospital-list-content-item-data">
      <div class="hospital-list-content-item-data-wrap">
        <nuxt-link :to="`/hospital/${hospitalDatas.user_id}`">
          <div class="hospital-item-content-left">
            <div class="hospital-list-content-item-name">
              {{ hospitalDatas.user_name }}
              <img
                src="~assets/img/medicine-authentication.png"
                class="hospital-list-content-item-authentication"
              >
            </div>
            <div class="hospital-list-content-item-address">
              地址：{{ hospitalDatas.user_attributes.user_address }}
            </div>
          </div>
        </nuxt-link>

        <div class="hospital-item-content-right">
          <nuxt-link :to="`/hospital/${hospitalDatas.user_id}`">
            <div class="hospital-item-content-right-details">
              <div class="hospital-item-content-right-details-icon" />
              <div class="hospital-item-content-right-details-text">
                查看详情
              </div>
            </div>
          </nuxt-link>
          <nuxt-link to="/aboutus" rel="nofollow">
            <div class="hospital-item-content-right-consultation">
              <div class="hospital-item-content-right-consultation-icon" />
              <div class="hospital-item-content-right-consultation-text">
                免费咨询
              </div>
            </div>
          </nuxt-link>
        </div>
      </div>
      <div class="hospital-list-content-item-num">
        <div v-if="hospitalDatas.user_statistic.case!=0" class="hospital-list-content-item-case">
          日记 <span>{{ hospitalDatas.user_statistic.case }}</span>篇
        </div>
        <div class="hospital-list-content-item-place_total">
          预约 <span>{{ hospitalDatas.user_statistic.place_total }}</span>个
        </div>
      </div>
      <div class="hospital-item-content-product">
        <div
          v-if="hospitalDatas.hospital_service.list.length>=1"
        >
          <nuxt-link :to="`/product/${hospitalDatas.hospital_service.list[0].product_id}`" class="hospital-item-content-product-one">
            <div class="hospital-item-content-product-one-name-wrap">
              <div class="hospital-item-content-product-one-icon" />
              <div class="hospital-item-content-product-one-product_name">
                {{ hospitalDatas.hospital_service.list[0].product_name }}
              </div>
            </div>
            <div class="hospital-item-content-product-one-price">
              ￥{{ hospitalDatas.hospital_service.list[0].package.sale.selling_price }}
            </div>
          </nuxt-link>
        </div>
        <div
          v-if="hospitalDatas.hospital_service.list.length>=2"
        >
          <nuxt-link :to="`/product/${hospitalDatas.hospital_service.list[1].product_id}`" class="hospital-item-content-product-two">
            <div class="hospital-item-content-product-two-name-wrap">
              <div class="hospital-item-content-product-two-icon" />
              <div class="hospital-item-content-product-two-product_name">
                {{ hospitalDatas.hospital_service.list[1].product_name }}
              </div>
            </div>
            <div class="hospital-item-content-product-two-price">
              ￥{{ hospitalDatas.hospital_service.list[1].package.sale.selling_price }}
            </div>
          </nuxt-link>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    hospitalDatas: {
      type: Object,
      default: () => { }
    }
  },
  mounted() {
    // console.log(this.hospitalDatas, 123)
  }
}
</script>
<style scoped lang="scss">
.hospital-list-content-item-wrap:hover{
    box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
}
.hospital-list-content-item-wrap {
  display: flex;
  margin-top: 10px;
  padding: 8px 10px
}
.hospital-list-content-item-data-wrap{
  width: 740px;
  display: flex;
  justify-content: space-between;
}
.hospital-list-content-item-photo-wrap:hover{
  cursor: pointer;
}
.hospital-list-content-item-photo-wrap {
  width: 80px;
  height: 80px;
  position: relative;
  .hospital-list-content-item-photo {
    width: 80px;
    height: 80px;
  }
  .hospital-list-content-item-photo-authentication {
    width: 13px;
    height: 14px;
    position: absolute;
    bottom: 0;
    right: 0;
  }
}
.hospital-list-content-item-data {
  margin-left: 10px;
  .hospital-list-content-item-name {
    font-size: 16px;
    font-weight: 600;
    color: rgba(51, 51, 51, 1);
    line-height: 22px;
    .hospital-list-content-item-authentication {
      width: 33px;
      height: 14px;
    }
  }
  .hospital-list-content-item-address {
    font-size: 12px;
    font-weight: 400;
    color: rgba(153, 153, 153, 1);
    line-height: 17px;
    margin-top: 5px;
  }
  .hospital-list-content-item-num {
    display: flex;
    margin-top: 17px;
    .hospital-list-content-item-case {
      width: 80px;
      height: 20px;
      background: rgba(245, 245, 245, 1);
      border-radius: 10px;
      font-size: 12px;

      font-weight: 400;
      color: rgba(102, 102, 102, 1);
      line-height: 20px;
      text-align: center;
      > span {
        color: #333;
      }
    }
    .hospital-list-content-item-place_total {
      width: 96px;
      height: 20px;
      background: rgba(245, 245, 245, 1);
      border-radius: 10px;
      font-size: 12px;

      font-weight: 400;
      color: rgba(102, 102, 102, 1);
      line-height: 20px;
      text-align: center;
      margin-left: 12px;
      > span {
        color: #333;
      }
    }
  }
}
.hospital-item-content-product{
  margin-top: 9px;
  padding-right: 22px;
}
.hospital-item-content-product-one{
  width: 100%;
  height: 50px;
  border-top: 1px solid rgba(240,240,240,1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  .hospital-item-content-product-one-icon{
    width: 18px;
    height: 18px;
    background: url('~assets/img/buy.png') center center no-repeat;
    background-size: 100% 100%;
  }
  .hospital-item-content-product-one-product_name{
    width: 600px;
    font-size:14px;
    font-family:PingFangSC-Regular,PingFang SC;
    font-weight:400;
    color:rgba(51,51,51,1);
    line-height:20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hospital-item-content-product-one-price{
    font-size:14px;
    font-family:PingFangSC-Regular,PingFang SC;
    font-weight:400;
    color:rgba(255,0,69,1);
    line-height:20px;
  }
}
.hospital-item-content-product-one:hover{
  cursor: pointer;
}
.hospital-item-content-product-two{
  width: 100%;
  height: 50px;
  border-top: 1px solid rgba(240,240,240,1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  .hospital-item-content-product-two-icon{
    width: 18px;
    height: 18px;
    background: url('~assets/img/buy.png') center center no-repeat;
    background-size: 100% 100%;
  }
  .hospital-item-content-product-two-product_name{
    width: 600px;
    font-size:14px;
    font-family:PingFangSC-Regular,PingFang SC;
    font-weight:400;
    color:rgba(51,51,51,1);
    line-height:20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hospital-item-content-product-two-price{
    font-size:14px;
    font-family:PingFangSC-Regular,PingFang SC;
    font-weight:400;
    color:rgba(255,0,69,1);
    line-height:20px;
  }
}
.hospital-item-content-product-two:hover{
  cursor: pointer;
}

.hospital-item-content-right {
  display: flex;
  margin-right: 22px;
  .hospital-item-content-right-details:hover{
    cursor: pointer;
    background: rgba(246, 246, 246, 1);
  }
  .hospital-item-content-right-details {
    margin-right: 25px;
     width: 59px;
    height: 59px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    .hospital-item-content-right-details-icon {
      width: 23px;
      height: 23px;
      background: url("~assets/img/query-icon.png") center center no-repeat;
      background-size: 100% 100%;
      margin: 0 auto;
    }
    .hospital-item-content-right-details-text {
      font-size: 12px;

      font-weight: 400;
      color: rgba(153, 153, 153, 1);
      line-height: 17px;
    }
  }
  .hospital-item-content-right-consultation:hover{
    cursor: pointer;
    background: rgba(246, 246, 246, 1);
  }
  .hospital-item-content-right-consultation {
    width: 59px;
    height: 59px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    .hospital-item-content-right-consultation-icon {
      width: 23px;
      height: 23px;
      background: url("~assets/img/consultation-icon.png") center center
        no-repeat;
      background-size: 100% 100%;
      margin: 0 auto;
    }
    .hospital-item-content-right-consultation-text {
      font-size: 12px;

      font-weight: 400;
      color: rgba(153, 153, 153, 1);
      line-height: 17px;
    }
  }
}
.hospital-item-content-left:hover{
  cursor: pointer;
}

.hospital-item-content-product-one-name-wrap{
  display: flex;
}
.hospital-item-content-product-two-name-wrap{
  display: flex;
}
</style>
